<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="创建者" prop="userId">
            <a-input v-model="form.userId" placeholder="请输入创建者"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="创建部门" prop="deptId">
            <a-input v-model="form.deptId" placeholder="请输入创建部门"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="创建名称" prop="userName">
            <a-input v-model="form.userName" placeholder="请输入创建名称"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="部门名称" prop="deptName">
            <a-input v-model="form.deptName" placeholder="请输入部门名称"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="公司ID" prop="companyId">
            <a-input v-model="form.companyId" placeholder="请输入公司ID"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="进件编号" prop="jinjianId">
            <a-input v-model="form.jinjianId" placeholder="请输入进件编号"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="结算金额" prop="amount">
            <a-input-number v-model="form.amount" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12" >
          <a-form-model-item label="结算类型" prop="type">
            <a-select
              placeholder="请选择结算类型"
              v-model="form.type"
              :getPopupContainer="
                triggerNode => {
                  return triggerNode.parentNode || document.body
                }
              "
              style="width: 100%"
              allow-clear>
              <a-select-option v-for="(d, index) in typeOptions" :key="index" :value="d.dictValue">{{ d.dictLabel }}</a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="结算比例" prop="lv">
            <a-input-number v-model="form.lv" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客户姓名" prop="cusName">
            <a-input v-model="form.cusName" placeholder="请输入客户姓名"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客服姓名" prop="serviceName">
            <a-input v-model="form.serviceName" placeholder="请输入客服姓名"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客服ID" prop="serviceId">
            <a-input v-model="form.serviceId" placeholder="请输入客服ID"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="客户ID" prop="customerId">
            <a-input v-model="form.customerId" placeholder="请输入客户ID"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="签单时间" prop="qdTime">
            <a-date-picker
              v-model="form.qdTime"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="放款时间" prop="fkTime">
            <a-date-picker
              v-model="form.fkTime"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="排序" prop="sort">
            <a-input-number v-model="form.sort" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12" >
          <a-form-model-item label="结算状态" prop="status">
            <a-select
              placeholder="请选择结算状态"
              v-model="form.status"
              :getPopupContainer="
                triggerNode => {
                  return triggerNode.parentNode || document.body
                }
              "
              style="width: 100%"
              allow-clear>
              <a-select-option v-for="(d, index) in statusOptions" :key="index" :value="d.dictValue">{{ d.dictLabel }}</a-select-option>
            </a-select>
          </a-form-model-item>
        </a-col>
      </a-row>
      </a-spin>
       <div class="bottom-control">
              <a-space>
              <a-button @click="cancel">
                  取消
              </a-button>
              <a-button type="primary" @click="submitForm">
                  保存
              </a-button>
              </a-space>
       </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizCapBillEditForm from "./BizCapBillForm"
export default {
  ...BizCapBillEditForm
}
</script>
